﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdAuditInfo : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdAuditInfo(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdAuditInfo obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdAuditInfo()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdAuditInfo(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdAuditInfo() : this(GlobalsPINVOKE.new_OdAuditInfo(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool fixErrors()
		{
			bool result = GlobalsPINVOKE.OdAuditInfo_fixErrors(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFixErrors(bool fixErrors)
		{
			GlobalsPINVOKE.OdAuditInfo_setFixErrors(this.swigCPtr, fixErrors);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public int numErrors()
		{
			int result = GlobalsPINVOKE.OdAuditInfo_numErrors(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int numFixes()
		{
			int result = GlobalsPINVOKE.OdAuditInfo_numFixes(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void errorsFound(int count)
		{
			GlobalsPINVOKE.OdAuditInfo_errorsFound(this.swigCPtr, count);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void errorsFixed(int count)
		{
			GlobalsPINVOKE.OdAuditInfo_errorsFixed(this.swigCPtr, count);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printError(string name, string value, string validation, string defaultValue)
		{
			GlobalsPINVOKE.OdAuditInfo_printError__SWIG_0(this.swigCPtr, name, value, validation, defaultValue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printError(string name, string value, string validation)
		{
			GlobalsPINVOKE.OdAuditInfo_printError__SWIG_1(this.swigCPtr, name, value, validation);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printError(string name, string value)
		{
			GlobalsPINVOKE.OdAuditInfo_printError__SWIG_2(this.swigCPtr, name, value);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printError(OdRxObject pObject, string value, string validation, string defaultValue)
		{
			GlobalsPINVOKE.OdAuditInfo_printError__SWIG_3(this.swigCPtr, OdRxObject.getCPtr(pObject), value, validation, defaultValue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printError(OdRxObject pObject, string value, string validation)
		{
			GlobalsPINVOKE.OdAuditInfo_printError__SWIG_4(this.swigCPtr, OdRxObject.getCPtr(pObject), value, validation);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printError(OdRxObject pObject, string value)
		{
			GlobalsPINVOKE.OdAuditInfo_printError__SWIG_5(this.swigCPtr, OdRxObject.getCPtr(pObject), value);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void printInfo(string logInfo)
		{
			GlobalsPINVOKE.OdAuditInfo_printInfo(this.swigCPtr, logInfo);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void requestRegen()
		{
			GlobalsPINVOKE.OdAuditInfo_requestRegen(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void resetNumEntities()
		{
			GlobalsPINVOKE.OdAuditInfo_resetNumEntities(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void incNumEntities()
		{
			GlobalsPINVOKE.OdAuditInfo_incNumEntities(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public int numEntities()
		{
			int result = GlobalsPINVOKE.OdAuditInfo_numEntities(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdAuditInfo.MsgInfo getLastInfo()
		{
			OdAuditInfo.MsgInfo result = new OdAuditInfo.MsgInfo(GlobalsPINVOKE.OdAuditInfo_getLastInfo(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setLastInfo(OdAuditInfo.MsgInfo lastInfo)
		{
			GlobalsPINVOKE.OdAuditInfo_setLastInfo(this.swigCPtr, OdAuditInfo.MsgInfo.getCPtr(lastInfo));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setPrintDest(OdAuditInfo.PrintDest printDest)
		{
			GlobalsPINVOKE.OdAuditInfo_setPrintDest(this.swigCPtr, (int)printDest);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdAuditInfo.PrintDest getPrintDest()
		{
			OdAuditInfo.PrintDest result = (OdAuditInfo.PrintDest)GlobalsPINVOKE.OdAuditInfo_getPrintDest(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public class MsgInfo : IDisposable
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public MsgInfo(IntPtr cPtr, bool cMemoryOwn)
			{
				this.swigCMemOwn = cMemoryOwn;
				this.swigCPtr = new HandleRef(this, cPtr);
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public static HandleRef getCPtr(OdAuditInfo.MsgInfo obj)
			{
				if (obj != null)
				{
					return obj.swigCPtr;
				}
				return new HandleRef(null, IntPtr.Zero);
			}

			~MsgInfo()
			{
				this.Dispose();
			}

			public virtual void Dispose()
			{
				if (this.swigCPtr.Handle != IntPtr.Zero)
				{
					if (this.swigCMemOwn)
					{
						lock (this.locker)
						{
							if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
							{
								this.swigCMemOwn = false;
								GlobalsPINVOKE.delete_OdAuditInfo_MsgInfo(this.swigCPtr);
							}
						}
						this.swigCMemOwn = false;
					}
					this.swigCPtr = new HandleRef(null, IntPtr.Zero);
				}
				GC.SuppressFinalize(this);
			}

			public string strName
			{
				get
				{
					string result = GlobalsPINVOKE.OdAuditInfo_MsgInfo_strName_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdAuditInfo_MsgInfo_strName_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public string strValue
			{
				get
				{
					string result = GlobalsPINVOKE.OdAuditInfo_MsgInfo_strValue_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdAuditInfo_MsgInfo_strValue_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public string strValidation
			{
				get
				{
					string result = GlobalsPINVOKE.OdAuditInfo_MsgInfo_strValidation_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdAuditInfo_MsgInfo_strValidation_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public string strDefaultValue
			{
				get
				{
					string result = GlobalsPINVOKE.OdAuditInfo_MsgInfo_strDefaultValue_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdAuditInfo_MsgInfo_strDefaultValue_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public bool bIsError
			{
				get
				{
					bool result = GlobalsPINVOKE.OdAuditInfo_MsgInfo_bIsError_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdAuditInfo_MsgInfo_bIsError_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public MsgInfo() : this(GlobalsPINVOKE.new_OdAuditInfo_MsgInfo(), true)
			{
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}

			private object locker = new object();

			private HandleRef swigCPtr;

			protected bool swigCMemOwn;
		}

		public enum PrintDest
		{
			kSilent,
			kCmdLine,
			kFile,
			kBoth
		}
	}
}
